package com.gao.r_hash.d._4_red_black_tree;

/**
 * @author gao
 * @time 2022/06/14 20:46:00
 * @Description 红黑树测试
 */
public class RedBlackTreeDemo {
    public static void main(String[] args) {
        int[] array = {10, 40, 30, 60, 70, 20, 50, 5, 0};
        RedBlackTree redBlackTree = new RedBlackTree();
        for (int i = 0; i < array.length; i++) {
            redBlackTree.insert(array[i]);
        }
        System.out.println("----------------红黑树中序遍历结果-------------------");
        redBlackTree.inOrder();
        redBlackTree.remove(60);
        System.out.println();
        System.out.println("----------------红黑树中序遍历结果-------------------");
        redBlackTree.inOrder();
    }
}
